#ifndef unigame_File_h
#define unigame_File_h

#include "config/Def.h"

namespace unigame
{
    enum FileType
    {
        E_RESOURCE_FT,
        E_TEMP_FT,
		E_SAVE_FT,
    };
    
    class File
    {
    public:
        File(const char* name, int32u type);
        ~File();
        
        void read();
        
        char* getData()
        {
            return m_data;
        }

		char* name()
		{
			return m_name;
		}
        
        void write(char* data, int32u len);
        
        int32u getSize()
        {
            return m_size;
        }
        
        void close();

    private:
        char* m_name;
        char* m_data;
        int32u m_size;
        int32u m_type;
    };
}

#endif
